<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>http::error</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__http__field.html" title="http::field">
<link rel="next" href="boost__beast__http__is_body.html" title="http::is_body">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__field.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__is_body.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__http__error"></a><a class="link" href="boost__beast__http__error.html" title="http::error">http::error</a>
</h4></div></div></div>
<p>
        <a class="indexterm" name="idm44861248440624"></a>
      </p>
<p>
        Error codes returned from HTTP algorithms and operations.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__error.h0"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__error.synopsis"></a></span><a class="link" href="boost__beast__http__error.html#beast.ref.boost__beast__http__error.synopsis">Synopsis</a>
      </h5>
<p>
        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/http/error.hpp" target="_top">boost/beast/http/error.hpp</a>&gt;</code>
      </p>
<pre class="programlisting"><span class="keyword">enum</span> <span class="identifier">error</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__http__error.h1"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__error.values"></a></span><a class="link" href="boost__beast__http__error.html#beast.ref.boost__beast__http__error.values">Values</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">end_of_stream</span></code>
                </p>
              </td>
<td>
                <p>
                  The end of the stream was reached.
                </p>
                <p>
                  This error is returned when attempting to read HTTP data, and the
                  stream returns the error <code class="computeroutput"><span class="identifier">net</span><span class="special">::</span><span class="identifier">error</span><span class="special">::</span><span class="identifier">eof</span></code>
                  before any octets corresponding to a new HTTP message have been
                  received.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">partial_message</span></code>
                </p>
              </td>
<td>
                <p>
                  The incoming message is incomplete.
                </p>
                <p>
                  This happens when the end of stream is reached during parsing and
                  some octets have been received, but not the entire message.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">need_more</span></code>
                </p>
              </td>
<td>
                <p>
                  Additional buffers are required.
                </p>
                <p>
                  This error is returned during parsing when additional octets are
                  needed. The caller should append more data to the existing buffer
                  and retry the parse operaetion.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">unexpected_body</span></code>
                </p>
              </td>
<td>
                <p>
                  An unexpected body was encountered during parsing.
                </p>
                <p>
                  This error is returned when attempting to parse body octets into
                  a message container which has the @ref empty_body body type.
                </p>
                <p>
                  @see empty_body
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">need_buffer</span></code>
                </p>
              </td>
<td>
                <p>
                  Additional buffers are required.
                </p>
                <p>
                  This error is returned under the following conditions:
                </p>
                <p>
                  @li During serialization when using @ref buffer_body. The caller
                  should update the body to point to a new buffer or indicate that
                  there are no more octets in the body.
                </p>
                <p>
                  @li During parsing when using @ref buffer_body. The caller should
                  update the body to point to a new storage area to receive additional
                  body octets.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">end_of_chunk</span></code>
                </p>
              </td>
<td>
                <p>
                  The end of a chunk was reached.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">buffer_overflow</span></code>
                </p>
              </td>
<td>
                <p>
                  Buffer maximum exceeded.
                </p>
                <p>
                  This error is returned when reading HTTP content into a dynamic
                  buffer, and the operation would exceed the maximum size of the
                  buffer.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">header_limit</span></code>
                </p>
              </td>
<td>
                <p>
                  Header limit exceeded.
                </p>
                <p>
                  The parser detected an incoming message header which exceeded a
                  configured limit.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">body_limit</span></code>
                </p>
              </td>
<td>
                <p>
                  Body limit exceeded.
                </p>
                <p>
                  The parser detected an incoming message body which exceeded a configured
                  limit.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_alloc</span></code>
                </p>
              </td>
<td>
                <p>
                  A memory allocation failed.
                </p>
                <p>
                  When basic_fields throws std::bad_alloc, it is converted into this
                  error by @ref parser.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_line_ending</span></code>
                </p>
              </td>
<td>
                <p>
                  The line ending was malformed.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_method</span></code>
                </p>
              </td>
<td>
                <p>
                  The method is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_target</span></code>
                </p>
              </td>
<td>
                <p>
                  The request-target is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_version</span></code>
                </p>
              </td>
<td>
                <p>
                  The HTTP-version is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_status</span></code>
                </p>
              </td>
<td>
                <p>
                  The status-code is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_reason</span></code>
                </p>
              </td>
<td>
                <p>
                  The reason-phrase is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_field</span></code>
                </p>
              </td>
<td>
                <p>
                  The field name is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_value</span></code>
                </p>
              </td>
<td>
                <p>
                  The field value is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_content_length</span></code>
                </p>
              </td>
<td>
                <p>
                  The Content-Length is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_transfer_encoding</span></code>
                </p>
              </td>
<td>
                <p>
                  The Transfer-Encoding is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_chunk</span></code>
                </p>
              </td>
<td>
                <p>
                  The chunk syntax is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_chunk_extension</span></code>
                </p>
              </td>
<td>
                <p>
                  The chunk extension is invalid.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">bad_obs_fold</span></code>
                </p>
              </td>
<td>
                <p>
                  An obs-fold exceeded an internal limit.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">stale_parser</span></code>
                </p>
              </td>
<td>
                <p>
                  The parser is stale.
                </p>
                <p>
                  This happens when attempting to re-use a parser that has already
                  completed parsing a message. Programs must construct a new parser
                  for each message. This can be easily done by storing the parser
                  in an boost or std::optional container.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">short_read</span></code>
                </p>
              </td>
<td>
                <p>
                  The message body is shorter than expected.
                </p>
                <p>
                  This error is returned by @ref file_body when an unexpected unexpected
                  end-of-file condition is encountered while trying to read from
                  the file.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__error.h2"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__error.description"></a></span><a class="link" href="boost__beast__http__error.html#beast.ref.boost__beast__http__error.description">Description</a>
      </h5>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
      Falco<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__field.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__is_body.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
